#!/usr/bin/env  python
#-*- coding:utf-8

import os
import tornado.web
import tornado.httpserver
import tornado.ioloop
import tornado.options

from tornado.options import options,define

define("port",default=8888,help="run on the given port",type=int)

class IndexHandler(tornado.web.RequestHandler):
	def get(self,*args,**kws):
		self.write("Hello Docker")



if __name__ == "__main__":
	tornado.options.parse_command_line()
	app = tornado.web.Application(handlers=[(r"/",IndexHandler),])
	http_server = tornado.httpserver.HTTPServer(app)
	http_server.listen(options.port)
	print "serving on port %s ..."%options.port
	tornado.ioloop.IOLoop.instance().start()
